package com.zjw.zy.coreui.fragment.adapter

import android.view.LayoutInflater
import android.view.ViewGroup
import com.zjw.zy.R
import com.zjw.zy.bean.MemorandumItem
import com.zjw.zy.base.BaseRecyclerAdapter
import com.zjw.zy.coreui.fragment.holder.MemorandumHolder

/**
 * @author     ：zhong.jw
 * @date       ：Created in 2022/9/30 9:44
 * @description：备忘录adapter
 */
class MemorandumAdapter(listener: ItemListener<MemorandumHolder>) :
    BaseRecyclerAdapter<MemorandumItem, MemorandumHolder>(listener) {

    companion object {
        private const val TAG = "MemorandumAdapter"
        private const val PAGE_SIZE = 10
        private const val ITEM_SEARCH_TYPE = 1
        private const val ITEM_COMMON_TYPE = 0
    }

    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): MemorandumHolder {
        val item = LayoutInflater.from(parent.context)
            .inflate(R.layout.holder_memorandum_item, parent, false)

        return MemorandumHolder(item)
    }

    /**
     * 添加搜索item
     * */
    override fun getItemViewType(position: Int): Int {
        return super.getItemViewType(position)
    }
}